//
//  RequestEngine.h
//  定制公交
//
//  Created by thinkjoy on 16/4/18.
//  Copyright © 2016年 thinkjoy. All rights reserved.
//

#import <Foundation/Foundation.h>


@interface RequestEngine : NSObject


//#pragma mark    post请求,请求中有需要上传文件
//- (void)postUpDataWithURL:(NSString *)urlString WithParmeters:(NSDictionary *)dictionary WithCompletion:(void (^)(NSDictionary *))completion withError:(void (^)(NSString *))errorStr;
//
///**
// *  需要上传图片的数据数组
// */
//@property   (nonatomic,strong)  NSArray *  picDataAry;


#pragma mark    - POST 登录
- (void)postLoginWithUrl:(NSString *)urlString parameterDic:(NSDictionary *)dictionary onSuccess:(void(^)(NSDictionary *_loginInfo))_onSuccess  onError:(void(^)(NSUInteger __errorCode,NSString *__errorMsg))_onError;

#pragma mark - get 普通get请求
/**
 *  普通get请求
 */
- (void) getWithURL:(NSString *)urlString parameterDic:(NSDictionary *)dictionary onSuccess:(void(^)(NSDictionary *_InfoDic))_onSuccess  onError:(void(^)(NSUInteger __errorCode,NSString *__errorMsg))_onError;

#pragma mark - POST 普通post请求
/**
 *  普通post请求
 */
- (void) postWithURL:(NSString *)urlString parameterDic:(NSDictionary *)dictionary onSuccess:(void(^)(NSDictionary *_InfoDic))_onSuccess  onError:(void(^)(NSUInteger __errorCode,NSString *__errorMsg))_onError;

#pragma mark - POST 带有请求体的Post请求
/**
 *  带有请求体的Post请求
 *
 *  @param urlString  url
 *  @param dictionary 普通键值对参数
 *  @param bodyDic    需要放到请求体的参数
 *  @param _onSuccess 成功
 *  @param _onError   失败
 */
- (void) postWithURL:(NSString *)urlString parameterDic:(NSDictionary *)dictionary bodyDic:(NSDictionary *)bodyDic onSuccess:(void(^)(NSDictionary *_InfoDic))_onSuccess  onError:(void(^)(NSUInteger __errorCode,NSString *__errorMsg))_onError;

@end
